package br.pucminas.virtual.validator.library.validators;

import android.text.TextUtils;
import br.pucminas.virtual.validator.library.FieldValidator;
import br.pucminas.virtual.validator.library.ValidationResult;

public class RequiredValidator implements FieldValidator {

	@Override
	public ValidationResult validate(String input) {

		if (input != null && !TextUtils.isEmpty(input)) {
			return new ValidationResult(true);
		}

		return new ValidationResult(false, REQUIRED_ERROR_MESSAGE);
	}

}
